package com.owen.shared.events;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public class SaveClassEvent extends GwtEvent<SaveClassEvent.Handler> {

	public static final Type<Handler> TYPE = new Type<Handler>();
	private final String classId, className;
	private final long id;
	

	public SaveClassEvent(String classId, String className, long id) {
		super();
		this.classId = classId;
		this.className = className;
		this.id = id;
	}

	public interface Handler extends EventHandler {
		void processEdit(String classId, String className, long id);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<Handler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(Handler handler) {
		handler.processEdit(classId, className, id);
	}

}
